import { createApp } from 'vue';
import App from './App.vue';
import router from './router/router.js';
import store from './store';
//全局样式
import './assets/reset.css';
//vant 按需引入
import UIComponents from './ui/ui';
//自适应布局
import '@/utils/setHtmlFontSize';
//mock引用
process.env.NODE_ENV == 'development'&& process.env.VUE_APP_MOCK ==true  && require('../mock');
//状态码
import CODE from './api/handler/code.js';
//引入全局弹窗
import myDialog from './components/dialog/src/index.js';
//引入MD5加密
import md5 from 'js-md5';
//引入工具函数
import {Debounce} from '@/utils/index'
const app = createApp(App); // 创建实例
//使用Vant组件库
UIComponents(app);  

app.config.globalProperties.$Debounce = Debounce; 
app.config.globalProperties.$md5 = md5;
app.config.globalProperties.$CODE = CODE;

app.use(router);
app.use(store);

app.use(myDialog);
app.mount('#app'); //挂载实例
